import request from '@/utils/request'

//从配置中获取业务的地址
import {baseUrlConfig} from '@/config/config'
const bastPath = baseUrlConfig.processBaseUrl

// 根据科室获取员工信息
export const getPersonLst = (data: any) => {
    return request({
        url: bastPath + `/quality/performance/find/page`,
        method: 'post',
        data
    })
}

// 获取工作标准分类回显
export const getWorkStandardsList = (catalogueId:any) => {
    return request({
        url: bastPath + `/knowledge/documentStandardClassification/getList?catalogueId=${catalogueId}`,
        method: 'get',
    })
}

// 获取关联条例
export const getRegulationsList = (standardsId:any)=> {
    return request({
        url: bastPath + `/working/documentWorkingStandard/list?standardsId=${standardsId}`,
        method: 'get',
    })
}

//模糊搜索关联条例
export const getRegulationsList2 = (standardsId:any,ruleContent:any)=> {
    return request({
        url: bastPath + `/working/documentWorkingStandard/list?standardsId=${standardsId}&ruleContent=${ruleContent}`,
        method: 'get',
    })
}

// 修改绩效
export const editStatus = (data:any) => {
    return request({
        url: bastPath + `/quality/performance/editStatus`,
        method: 'put',
        data
    })
}
//批量审核
export const onReview = (data:any) => {
    return request({
        url: bastPath + `/quality/performance/payload`,
        method: 'put',
        data
    })
}
// 批量审核2
export const onReviewFn = (data:any) => {
    return request({
        url: bastPath + `/quality/performance/reviewpayload`,
        method: 'put',
        data
    })
}
//截止日期----查询截止日期功能的数据（回显）
export const getDeadlinelist = () => {
    return request({
        url: bastPath + `/quality/performance/deadlinelist`,
        method: 'get',
    })
}
//修改截止日期
export const updateDeadlinelist = (data:any) => {
    return request({
        url: bastPath + `/quality/performance/deadline`,
        method: 'put',
        data
    })
}

// 获取在岗时长
export const getOnlineDuration = (attendanceMonth:any,staffId:any) => {
    return request({
        url: bastPath + `/quality/scheduleScheme/getWorkHour?attendanceMonth=${attendanceMonth}&staffId=${staffId}`,
        method: 'get',
    })
}

// 查询钉钉考勤记录
export const getEmpClock = (data:any) => {
    return request({
        url: bastPath + `/quality/employee/getEmpClock`,
        method: 'post',
        data
    })
}

// 导出
export const exportList = (data:any) => {
    return request({
        url: bastPath + `/quality/performance/export`,
        method: 'post',
        responseType: 'blob',
        data
    })
}
